package com.zhiwang.planet.ui.my.reward

import android.os.Bundle
import android.view.View
import com.zhiwang.planet.R
import com.zhiwang.planet.ui.BaseActivity
import com.zhiwang.planet.util.createFragmentPagerAdapter
import com.zhiwang.planet.util.suicideAfterTransition
import kotlinx.android.synthetic.main.activity_reward_list.*

class RewardListActivity : BaseActivity()/*, RewardListView, KmView, InputPromotionDialog.Companion.OnPromoteListener*/ {

//    @Inject
//    lateinit var presenter: ScalarPresenter
//
//    var page = 1
//
//    private val rewardList = arrayListOf<Reward>()
//    private val adapter = RewardAdapter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_reward_list)
//        DaggerListComponent.builder()
//                .appComponent(getAppComponent())
//                .autoDisposeModule(AutoDisposeModule(this))
//                .build()
//                .inject(this)
//        presenter.rewardListView = this
//        presenter.kmView = this
//        init()
        viewPager.adapter = createFragmentPagerAdapter(
                listOf("我的奖品", "福利卡"),
                supportFragmentManager,
                listOf(RewardsFragment(rewardMode = true),
                        RewardsFragment(rewardMode = false))

        )
        tabLayout.setupWithViewPager(viewPager)
        navBtn.setOnClickListener { suicideAfterTransition() }
    }




}

